#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
	int N;
	cin >> N;
	printf("%d ano(s)\n", N/365);
	N %= 365;
	printf("%d mes(es)\n",N/30 );
	N %= 30;
	printf("%d dia(s)\n", N);
	return 0;
}